Merged
Conversation
Contributor
Author
|
@coxmars This PR is ready for review and to be merged. |
coxmars
reviewed
Apr 27, 2025
examples/cairo/scripts/fizzbuzz/src/utils/number_converter.cairo
Outdated
Show resolved
Hide resolved
coxmars
suggested changes
Apr 27, 2025
Contributor
coxmars
left a comment
There was a problem hiding this comment.
@GideonBature Just adjust what I told you, if you are not using it just delete it or if you use it try to change that for our own functions from simple_math than creating a new one.
Contributor
Author
True, almost forgot that, was playing around with it while trying out other implementations, till I got a better way of using ASCII. Thank you for the review. Done as requested. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the classic FizzBuzz problem in Cairo as requested in issue #216. The implementation follows the standard rules:
Implementation Details
examples/cairo/scripts/fizzbuzz/fizzbuzzfunction that takes a numbernand returns an array of strings from 1 to nu32_to_felt252to convert numbers to string representationFile Structure
.tool-versions: Specifies Scarb version 2.11.2Scarb.toml: Project configurationsrc/fizz_buzz.cairo: Main FizzBuzz implementationsrc/utils/number_converter.cairo: Utility functions for number-to-string conversiontests/test_fizzbuzz.cairo: Test cases validating the implementationTesting
The implementation includes tests for various input values:
All tests pass successfully, confirming the implementation meets the requirements specified in issue #216.
🖼️ Screenshots (if applicable)
Related Issue
Closes #216